adlab = {
	url:{
		
	},	
	init:function(){
		try
		{			
			this.initEvent();		
		}
		catch (e)
		{
			console.log(e);
		}
	},
	initEvent:function(){
		var This = this;		
		This.update = function(){			
			$(".number-page").click(function(){
				var This_page = this;
				ajaxData = {};
				ajaxData['page'] = $(this).attr('id');
				$.ajax({
					url: "/adlab/ajaxdoc",
					type: 'post',				
					data: ajaxData,
					success:function(response){
						$("#tbl_content").html(response);						
						$(".a-select").removeClass('a-select');
						$(This_page).addClass('a-select');
						console.log(response);
					}
				});
			});
			$(".number-page-product").click(function(){
				var This_page_product = this;
				ajaxData = {};
				ajaxData['page_product'] = $(this).attr('id');
				$.ajax({
					url: "/adlab/ajaxproduct",
					type: 'post',				
					data: ajaxData,
					success:function(response){
						$("#tbl_content_product").html(response);						
						$(".a-select-product").removeClass('a-select-product');
						$(This_page_product).addClass('a-select-product');
						console.log(response);
					}
				});
			});
		}
		This.update();			
	},		
} 

$(document).ready(function(){		
	adlab.init();	
});